{include file="./public/footer" /}
{include file="./public/menu" /}

<!--/sidebar-->
<div class="main-wrap">

    <div class="crumb-wrap">
        <div class="crumb-list"><i class="icon-font"></i><a href="/admin.php">首页</a><span class="crumb-step">&gt;</span><a class="crumb-name" href="/admin.php/rule/lists">权限管理</a><span class="crumb-step">&gt;</span><span>编辑权限</span></div>
    </div>
    <div class="result-wrap">
        <div class="result-content">
            <form  id="andy_form"  name="myform" enctype="multipart/form-data">
                <table class="insert-tab" width="100%">
                    <tbody>
                    <tr>
                        <th><i class="require-red">*</i>权限名称：</th>
                        <td>
                            <input class="common-text required" id="title" name="rule_name" size="50"  type="text" value="{$result.rule_name}">
                        </td>
                    </tr>
                    <tr>
                        <th><i class="require-red">*</i>控制器/方法：</th>
                        <td><input class="common-text" name="rule_url" size="50" type="text" value="{$result.rule_url}"></td>
                    </tr>

                    <tr>
                        <th>权限样式：</th>
                        <td><input class="common-text" name="rule_css" size="50"  type="text" value="{$result.rule_css}"></td>
                    </tr>
                    <tr>
                        <th width="120">所属分类：</th>
                        <td>
                            <select name="pid" id="pid" class="required">
                                <option value="0" {if ($result.pid eq 0)}selected{/if}>顶级分类</option>
                                {volist name="rule" id="r"}
                                    <option value="{$r.rule_id}" {if ($result.pid eq $r.rule_id)}selected{/if}>{if ($r.pid eq 0)}&nbsp;&nbsp;{else /}&nbsp;&nbsp;&nbsp;&nbsp;<?php echo '|-'.str_repeat('-',$r['level'] * 6);?>{/if}{$r.rule_name}</option>
                                {/volist}
                            </select>
                        </td>
                    </tr>

                    <tr>
                        <th>状态：</th>
                        <td>
                            &nbsp;<input type="radio"  value="1" size="85" name="rule_status" class="common-text" {if ($result.rule_status eq 1)}checked{/if}>显示&nbsp;&nbsp;&nbsp;&nbsp;
                            &nbsp;<input type="radio" value="0" name="rule_status" size="85" class="commont-text" {if ($result.rule_status eq 0)}checked{/if}>隐藏
                        </td>
                    </tr>

                    <input type="hidden" name="rule_id" value="{$result.rule_id}">
                    <tr>
                        <th></th>
                        <td>
                            <input class="btn btn-primary btn6 mr10" id="andy_button_submit" value="提交" type="button">
                            <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button">
                        </td>
                    </tr>
                    </tbody></table>
            </form>
        </div>
    </div>

</div>
<!--/main-->
<script>

    var SCOPE = {
        'save_url' : '/admin.php/rule/add',
        'jump_url' : '/admin.php/rule/lists',
    }
</script>
{include file="Public/bottom" /}